<?php

class DbFieldEntity extends DbEntity
{
    public function onExtracting( $id, array $val, IDbMapper $chain )
    {
        if( ! isset( $val[0] ) ) return false;
        
        $idx = array_shift( $val );
	    
	    $chain->fields[] = $idx;
	    $chain->fieldMaps[ $idx ] = $id;
		$chain->properties[ $id ] = '';        
    }
}
